Links
dtSearch Text Retrieval Engine Programmer's Reference 7.70
IServer::ConvertPath Method
IServer Interface | IServer Interface | Send Feedback

Use ConvertPath to convert between virtual and local paths.

[id(25), helpstring("method ConvertPath")]
HRESULT ConvertPath(BSTR path, long siteId, long flags, BSTR tableLocation, [out, retval] BSTR * pVal);
Parameters
Parameters 
Description 
BSTR path 
Path to convert 
long siteId 
ID of the web site on a web server. If there is only one web site on the server, use 1. The ASP value Request.ServerVariables("INSTANCE_ID") can be used if the web server has more than one web site. (The web site id is needed because each site has its own mapping between virtual and local paths.) 
long flags 
ConvertPathFlags specifying the type of conversion 
reserved 
Not used 
Returns

The result of the conversion

Remarks

Internet Information Server stores its mapping between virtual and local paths in the Metabase. Reading this information from the Metabase is time-consuming and requires access rights that may not be available to a process running in the web server context. Therefore, the dtSearch Engine caches this information in the registry, under the key HKEY_LOCAL_MACHINE\Software\dtSearch Corp.\dtSearch\Virtual Roots. By default, ConvertPath will use the cached table values. Call ConvertPath with the dtsCpRefreshMappings + dtsCpStoreInRegistry flags to update the cached information. (Running dtWebSetup.exe, the dtSearch Web Setup program, will also update this information.) 

If ConvertPath returns a blank string, it means that either (1) the folder passed in does not have a virtual directory associated with it, or (2) the registry tables have not been refreshed since the virtual directory was created.

Interface
Links
You are here: COM Interface > Interfaces > IServer Interface > IServer::ConvertPath Method
Copyright (c) 1995-2012 dtSearch Corp. All rights reserved.